package cn.com.truelore.adapter;

import java.util.List;

import android.content.Context;
import android.text.Html;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import cn.com.truelore.R;
import cn.com.truelore.vo.ZhaoBiaoGGVO;

public class ZhaoBiaoGGListAdapter extends BaseAdapter {

	private LayoutInflater mInflater;
	/**
	 * 需要显示的数据列表
	 */
	private List<ZhaoBiaoGGVO> dataList;

	public ZhaoBiaoGGListAdapter(Context context) {
		mInflater = LayoutInflater.from(context);
	}

	public int getCount() {
		return dataList.size();
	}

	public Object getItem(int position) {
		return null;
	}

	public long getItemId(int position) {
		return 0;
	}

	public View getView(int position, View convertView, ViewGroup parent) {

		ZhaoBiaoGGListViewHolder holder = new ZhaoBiaoGGListViewHolder();
		ZhaoBiaoGGVO itemVO = dataList.get(position);

		convertView = mInflater.inflate(R.layout.listview_zhaobiaogg_list_page,
				null);

		holder.textZhaoBiaoGGTitle = (TextView) convertView
				.findViewById(R.id.textZhaoBiaoGGTitle);
		holder.textZhaoBiaoGGTitle.setText(Html.fromHtml(itemVO.getTitile()
				+ " " + itemVO.getDate()));
		return convertView;
	}

	public List<ZhaoBiaoGGVO> getDataList() {
		return dataList;
	}

	public void setDataList(List<ZhaoBiaoGGVO> dataList) {
		this.dataList = dataList;
	}

	public final class ZhaoBiaoGGListViewHolder {
		public TextView textZhaoBiaoGGTitle;
	}
}
